const run = async (runtime, ast, runs) => {
  if (ast.type !== 'function') return

  for (const node of ast.body) {
    for (const run of runs) {
      if (runtime.return !== null) break
      await run(runtime, ast, node)
    }
  }
}

export default run